package com.wk.springcloud.user.server.feign;

import com.wk.springcloud.user.feign.interfaces.IFeignUser;
import com.wk.springcloud.user.feign.qo.UserQO;
import com.wk.springcloud.user.feign.vo.UserVO;
import com.wk.springcloud.user.server.biz.FeignUserBiz;
import com.wk.springcloud.user.server.dao.impl.mapper.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户基本信息
 *
 * @author wujing
 */
@RestController
public class FeignUserController implements IFeignUser {

    @Autowired
    private FeignUserBiz biz;

    @Override
    public int save(@RequestBody UserQO qo) {
        return biz.save(qo);
    }

    @Override
    public int deleteById(@PathVariable(value = "id") Long id) {
        return biz.deleteById(id);
    }

    @Override
    public int updateById(@RequestBody UserQO qo) {
        return biz.updateById(qo);
    }

    @Override
    public UserVO getById(@PathVariable(value = "id") Long id) {
        return biz.getById(id);
    }

    @Override
    public String hello() {
        return "my spring cloud , say 【hello】 to you !!!";
    }

}
